<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var year = prompt('请输入工作年龄')
    var yuan = prompt('请输入薪资')
    var beishu = ''
    if(year == 0){
        beishu = yuan > 8000 ? 1.2 : 1
    }else if(year == 1){
        beishu = yuan > 10000 ? 1.7 : 1.5
    }else if(year >= 2){
        beishu = yuan > 12000 ? 3.2 : 3
    }
    console.log('您在本公司工作了',year,'年','月薪',yuan,'年终奖有',yuan*beishu)
</script>